package com.sip.stream.utils.zfy.holder;


import com.sip.stream.ClientApp;
import com.sip.stream.R;
import com.sip.stream.databinding.ViewholderStatusMobileNetworkBinding;
import com.sip.stream.utils.zfy.adapter.BaseDataBindingViewHolder;
import com.sip.stream.utils.zfy.listener.DataBindingViewHolderClickListener;
import com.sip.stream.utils.zfy.status.ZFYStatus;

public class ZFYStatusMobileNetWorlViewHolder extends BaseDataBindingViewHolder<ViewholderStatusMobileNetworkBinding, String> {
    public ZFYStatusMobileNetWorlViewHolder(ViewholderStatusMobileNetworkBinding viewholderStatusMobileNetworkBinding, DataBindingViewHolderClickListener<String> dataBindingViewHolderClickListener) {
        super(viewholderStatusMobileNetworkBinding, dataBindingViewHolderClickListener);
    }

    @Override
    public void onBindViewHolder(int i, String str) {
        super.onBindViewHolder(i,str);
        this.binding.tvMessage.setText(ZFYStatus.getInstance().getMobileNetworkStr());
        int mobileSignalStrength = ZFYStatus.getInstance().getMobileSignalStrength();
        int i2 = R.drawable.status_mobile_0;
        if (mobileSignalStrength == 0) {
            this.binding.ivContent.setImageDrawable(ClientApp.clientApp.getDrawable(R.drawable.status_mobile_0));
            this.binding.tvMessage.setTextColor(-7829368);
            return;
        }
        this.binding.tvMessage.setTextColor(-1);
        if (mobileSignalStrength >= 1) {
            i2 = mobileSignalStrength < 2 ? R.drawable.status_mobile_1 : mobileSignalStrength < 3 ? R.drawable.status_mobile_2 : mobileSignalStrength < 4 ? R.drawable.status_mobile_3 : R.drawable.status_mobile_4;
        }
        this.binding.ivContent.setImageDrawable(ClientApp.clientApp.getDrawable(i2));
    }
}
